package il.ac.mta.javaweb.ex1.logic.players;

import il.ac.mta.javaweb.ex1.logic.grids.MarkingGrid;

import java.awt.Point;

public class HumanPlayer extends PlayerBase
{

	public HumanPlayer(String playerName)
	{
		this.setName(playerName);
	}

	public void playTurn(Point positionToAttack, PlayerBase playerToAttack)
	{
		for (MarkingGrid grid : this.getEnemiesMarkingGrids())
		{
			if (grid.getPlayer().equals(playerToAttack))
			{
				grid.getPlayer().getOwnGrid().bomb(positionToAttack);
				break;
			}
		}
	}
}
